package com.csc.finalproject.domain;

import java.io.Serializable;
import java.util.Collection;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/*
 * author: Nguyen Ngoc Truc Giang
 * create day: 15/8
 * update :18/8
 */
@Entity
@Table(name = "depositaccounts")
public class DepositeAccount implements Serializable {
	/**
	 * relationship with AccountInfo class
	 */
	@ManyToOne()
	@JoinColumn(name = "accountinfoId")
	private AccountInfo accountInfo;
	/*
	 * attribute
	 */
	@Id
	@Column
	private int depositeAccountId;
	@Column
	private String name;
	@Column
	private String createDate;

	/*
	 * contructor
	 */
	public DepositeAccount() {

	}

	public DepositeAccount(int depositeAccountId, String name, String createDate) {
		super();
		this.depositeAccountId = depositeAccountId;
		this.name = name;
		this.createDate = createDate;
	}

	public DepositeAccount(AccountInfo accountInfo, int depositeAccountId,
			String name, String createDate) {
		super();
		this.accountInfo = accountInfo;
		this.depositeAccountId = depositeAccountId;
		this.name = name;
		this.createDate = createDate;
	}

	/*
	 * getter/setter
	 */
	public int getDepositeAccountId() {
		return depositeAccountId;
	}

	public void setDepositeAccountId(int depositeAccountId) {
		this.depositeAccountId = depositeAccountId;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getCreateDate() {
		return createDate;
	}

	public void setCreateDate(String createDate) {
		this.createDate = createDate;
	}

	public AccountInfo getAccountInfos() {
		return accountInfo;
	}

	public void setAccountInfos(AccountInfo accountInfo) {
		this.accountInfo = accountInfo;
	}

}
